﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="..\Themes\ExpressionDark.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="DefaultChrome" TargetType="{x:Type Window}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="SizeToContent" Value="Height" />
        <Setter Property="ResizeMode" Value="CanMinimize" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="AllowsTransparency" Value="True" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Window}">
                    <Border Margin="0,0,5,5" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1" CornerRadius="6" Background="{StaticResource WindowBackgroundBrush}">
                        <Border.Effect>
                            <DropShadowEffect Opacity="0.745" BlurRadius="5" ShadowDepth="5" />
                        </Border.Effect>

                        <!-- Grid used for busy state animation behavior -->
                        <Grid>
                            <StackPanel Margin="12">
                                <Label Content="{TemplateBinding Title}"
                                       Margin="0, 0, 0, 12"
                                       FontSize="36"
                                       Foreground="#44FFFFFF"
                                       FontWeight="Normal"
                                       FontStyle="Italic" />
                                <AdornerDecorator>
                                    <ContentPresenter Focusable="False" />
                                </AdornerDecorator>
                            </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LabelStyle" TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}">
        <Setter Property="Margin" Value="2" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Setter Property="HorizontalContentAlignment" Value="Right" />
    </Style>

    <Style x:Key="TextBoxStyle" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
        <Setter Property="Margin" Value="2" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>

    <Style x:Key="ComboBoxStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>

    <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
        <Setter Property="Margin" Value="3"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="100" />
    </Style>

    <Style x:Key="BaseListBoxStyle" TargetType="{x:Type ListBox}" BasedOn="{StaticResource {x:Type ListBox}}">
        <Setter Property="Margin" Value="3"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="100" />
    </Style>

    <RadialGradientBrush x:Key="SeparatorLineBrush">
        <GradientStop Color="#FF000000" Offset="0"/>
        <GradientStop Color="#00FFFFFF" Offset="1"/>
    </RadialGradientBrush>

    <LinearGradientBrush x:Key="SeparatorOpacityMaskBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FF000000" Offset="0"/>
        <GradientStop Color="#00FFFFFF" Offset="0.9"/>
    </LinearGradientBrush>

    <DataTemplate x:Key="Separator">
        <Grid Margin="0,10,0,5">
            <Border BorderThickness="1" Background="Transparent" Height="1" BorderBrush="Gold" OpacityMask="{DynamicResource SeparatorLineBrush}" />
            <Grid HorizontalAlignment="Stretch">
                <Border Background="White" Opacity="0.3" CornerRadius="3" OpacityMask="{DynamicResource SeparatorOpacityMaskBrush}" />
                <Label HorizontalAlignment="Left" Content="{Binding}" Margin="4" />
            </Grid>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="ExpanderSeparator">
        <Grid Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Expander}}}">
            <Border BorderThickness="1" Background="Transparent" Height="1" BorderBrush="Gold" OpacityMask="{DynamicResource SeparatorLineBrush}" />
            <Grid HorizontalAlignment="Stretch">
                <Label HorizontalAlignment="Left" Content="{Binding}" />
            </Grid>
        </Grid>
    </DataTemplate>
</ResourceDictionary>